<template>
  <div class="mask">
    <div class="docShow">
      <div class="docTitle" v-text="doc.title"></div>
      <div class="docContent">
        <div v-html="doc.content"></div>
      </div>
      <div class="docClose" @click="close">返回</div>
    </div>
  </div>
</template>

<script>
import { mapState } from 'vuex'
export default {
  computed: {
    ...mapState(['doc'])
  },
  methods: {
    close () {
      this.$store.commit('updateMask', false)
      this.$store.commit('updateDoc', {
        title: '',
        content: ''
      })
    }
  }

}
</script>

<style>

</style>
